![]() |
DrawThemeTab |
||||
Header: | Appearance.h | Carbon status: | Supported | |
Draws a tab.
OSStatus DrawThemeTab ( const Rect *inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection, ThemeTabTitleDrawUPP labelProc, UInt32 userData );
A pointer to a structure of type Rect. Before calling DrawThemeTab, set the rectangle to the bounds of the tab, in local coordinates. There are two standard sizes (or heights) for tabs that should be used in your calculation of the tab rectangle—these are measured by the distance the tabs protrude from the pane. Small tabs have a height of 16 pixels; large tabs have a height of 21 pixels. (The widths of tabs are variable.) Additionally, the distance that the tab overlaps the pane must be included in the tab rectangle; this overlap distance is always 3 pixels, although the 3-pixel overlap is only drawn for the front tab. The tab rectangle should reflect the orientation of the tab that is specified in the inDirection parameter.
A value of type ThemeTabStyle. Pass a constant specifying the relative position (front or non-front) and state of the tab. See
A value of type ThemeTabDirection. Pass a constant specifying the direction in which to orient the tab. See
A value of type ThemeTabTitleDrawUPP. Pass a universal function pointer to an application-defined function such as that described in ThemeTabTitleDrawProcPtr. DrawThemeTab calls your function to draw the title of the tab. If you pass NULL, no drawing occurs.
An unsigned 32-bit integer. Provide any data to be passed in to the userData parameter of the callback function specified in the labelProc parameter.
A result code.
The DrawThemeTab function draws a theme-compliant tab. A tab control consists of two basic components: multiple tabs that label the various content pages that can be displayed and a single pane upon which the content for each tab is drawn. Use the function DrawThemeTabPane to draw the tab pane. The Appearance Manager coordinates the appearance of the pane and frontmost tab automatically.
This function is available with Appearance Manager 1.1 and later.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)